load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library")
load("//common/automock:automock.bzl", "thrift_plugin_automock")

oncall("scm_server_infra")

thrift_library(
    name = "megarepo_configs",
    java_versions = [
        "21",
    ],
    languages = [
        "hs2",
        "rust",
        "py3-deprecated",
        "cpp2",
        "java-swift",
        "py-deprecated",
        "python",
    ],
    plugins = [
        thrift_plugin_automock,
    ],
    py3_namespace = "scm.service.thrift",
    py_base_module = "scm.service.thrift",
    py_remote_service_router = True,
    rust_autocargo = {"cargo_toml_dir": "megarepo_configs"},
    thrift_cpp2_options = [
        "reflection",
    ],
    thrift_py_options = "utf8strings",
    thrift_rust_options = "serde",
    thrift_srcs = {
        "megarepo_configs.thrift": [],
    },
    deps = [
        "//thrift/annotation:rust",
    ],
)
